package javaBase.javaException;

/**
 * Created by Administrator on 2017/2/23 0023.
 */

/**
 * 异常封闭输出
 */
public class ExceptionOutput {
    private String exceptionCode = "9999";
    private String execptionMessage = "其它错误";

    public ExceptionOutput(String exceptionCode) {
        this.exceptionCode = exceptionCode;
        this.execptionMessage = ExceptionConstants.getReturnCodeMap().get(
                this.exceptionCode);
    }

    // 封装返回结果，比如封闭成XML等，返回给调用处，这里打印输出一下。
    public void toXML() {
        System.out.println("Exception:" + this.execptionMessage);
    }
}
